package com.rt.easyjava.common.base;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by wxy on 2021/10/29.
 */
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "分页传输对象")
public class BaseDto extends PageDto implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id; // id或Id结尾，数据类型保持数据库一致

    @ApiModelProperty(hidden = true)
    private Object deleteflag; // 枚举，通过dozer转换:  当bean->dto时, 放入json对象 如{'id':1, 'name':'无效'}； 当dto->bean时, object->Integer
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdate;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date modifydate;
    private String createman;
    private Long createmanId;
    private String modifyman;
    private Long modifymanId;
    private Long companyId;

    private Long version;

    //----------------------------------------
    // 与页面交互时的参数
    //----------------------------------------
    private String createdate_Start;
    private String createdate_End;
    private String modifydate_Start;
    private String modifydate_End;
}
